package com.mc.fil.service.impl;

import java.util.List;
import com.mc.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mc.fil.mapper.FilMachiningOrderMapper;
import com.mc.fil.domain.FilMachiningOrder;
import com.mc.fil.service.IFilMachiningOrderService;

/**
 * 加工中心订单 Service业务层处理
 *
 * @author mc
 * @date 2021-04-13
 */
@Service
public class FilMachiningOrderServiceImpl implements IFilMachiningOrderService
{
    @Autowired
    private FilMachiningOrderMapper filMachiningOrderMapper;

    /**
     * 查询加工中心订单
     *
     * @param id 加工中心订单 ID
     * @return 加工中心订单
     */
    @Override
    public FilMachiningOrder selectFilMachiningOrderById(String id)
    {
        return filMachiningOrderMapper.selectFilMachiningOrderById(id);
    }

    /**
     * 查询加工中心订单 列表
     *
     * @param filMachiningOrder 加工中心订单
     * @return 加工中心订单
     */
    @Override
    public List<FilMachiningOrder> selectFilMachiningOrderList(FilMachiningOrder filMachiningOrder)
    {
        return filMachiningOrderMapper.selectFilMachiningOrderList(filMachiningOrder);
    }

    /**
     * 新增加工中心订单
     *
     * @param filMachiningOrder 加工中心订单
     * @return 结果
     */
    @Override
    public int insertFilMachiningOrder(FilMachiningOrder filMachiningOrder)
    {
        filMachiningOrder.setCreateTime(DateUtils.getNowDate());
        return filMachiningOrderMapper.insertFilMachiningOrder(filMachiningOrder);
    }

    /**
     * 修改加工中心订单
     *
     * @param filMachiningOrder 加工中心订单
     * @return 结果
     */
    @Override
    public int updateFilMachiningOrder(FilMachiningOrder filMachiningOrder)
    {
        filMachiningOrder.setUpdateTime(DateUtils.getNowDate());
        return filMachiningOrderMapper.updateFilMachiningOrder(filMachiningOrder);
    }

    /**
     * 删除加工中心订单 信息
     *
     * @param id 加工中心订单 ID
     * @return 结果
     */
    @Override
    public int deleteFilMachiningOrderById(String id)
    {
        return filMachiningOrderMapper.deleteFilMachiningOrderById(id);
    }
}